<template>
	<view>
		<view class="protocol-page">
			<view class="">
				{{protocolMsg.title}}
			</view>
			<view class="">
				<jyf-parser :html="content"></jyf-parser>
			</view>
		</view>
	</view>
</template>

<script>
	
	import jyfParser from "@/components/jyf-parser/jyf-parser";
	
	export default{
		components: {
			jyfParser
		},
		data(){
			return{
				protocolMsg:{},
				store_id:"",
				content:'',
			}
		},
		onLoad(option) {
			this.getprotocol()
		},
		methods:{
			// 用户协议
			getprotocol(){
				let data = {
					token:this.$store.getters.getToken,
					type:'banksetting'
				}
				this.$api.bingind_protocol(data).then(res => {
					console.log(res)
					if(res.status){
						this.protocolMsg = res.list.data[2]
						let content = this.protocolMsg.content;
						content = content.replace(/\r\n/g,"<br>");
						content = content.replace(/\n/g,"<br>");
						this.content = content
					}
				}).catch(err => {
					console.log(err)
				})
			},
		}
	}
</script>

<style>
	page{
		background: #F3F3F4;
	}
	.protocol-page{
		width: 100%;
		background: #FFFFFF;
		padding: 30upx;
		box-sizing: border-box;
	}
	.protocol-page>view:first-child{
		text-align: center;
		color: #333333;
		font-size: 32upx;
		text-align: center;
		margin-bottom: 20upx;
	}
	.protocol-page>view:last-child{
		color: #666666;
		font-size: 28upx;
		text-indent: 56upx;
	}
</style>
